home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: "Nathan Myers <ncm@cantrip.org>" <ncm@cantrip.org>
- Newsgroups: comp.std.c++
- Subject: Re: char_traits<T> return values
- Date: 13 Apr 1996 23:17:19 GMT
- Organization: Best Internet Communications
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <316F5716.53ABC674@cantrip.org>
- References: <316DB8A8.2556@cyberspy.com>
- NNTP-Posting-Host: taumet.eng.sun.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Nntp-Posting-Host: ncm.vip.best.com
- X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
- Content-Length: 606
- Originator: clamage@taumet
-
- Rich Paul wrote:
- > I have noticed, while working on the standard string class, that the
- > char_traits functions ...
- > ... when these functions get a string that contains eos(), do they
- > stop, or do they carry on to the bitter end?
-
- C++ strings don't pass judgment on what's in them; eos() is used
- purely as the value to slap onto the end when producing a c_str()
- value, or the terminator when constructing from a const char*.
-
- It only matters when you convert back via c_str(); then, of course,
- to C the string will look shorter than it is. Tough.
-
- Nathan Myers
- ncm@cantrip.org http://www.cantrip.org/
-
-
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-